﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace WebStudio.Mvc.Core.Filter
{
    /// <summary>
    /// IActionFilter
    /// </summary>
    public interface IActionFilter
    {
        // 方法

        #region OnActionExecuting
        /// <summary>
        /// 在Controller 里面的action method 调用之前运行
        /// </summary>
        /// <param name="filterContext"></param>
        void OnActionExecuting(ActionExecutingContext filterContext);

        #endregion

        #region OnActionExecuted
        /// <summary>
        /// 在Controller 里面的action method 调用之后运行，但是在IResultFilter接口的OnResultExecuting方法执行之前 
        /// </summary>
        /// <param name="filterContext"></param>
        void OnActionExecuted(ActionExecutedContext filterContext);
        
        #endregion

    }
}
